import { createRouter, createWebHistory } from 'vue-router'


const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    // {
    //   path: '/',
    //   name: 'home',
    //   component: HomeView
    // },
    // {
    {
      path: '/',
      name: 'Login',
      component: () => import('../views/Login.vue'),
      // path: '/',
      // name: 'MainView',
      // component: () => import('../views/MainView.vue'),
    },
      {
        // path: '/Login',
        // name: 'Login',
        // component: () => import('../views/Login.vue'),
        path: '/MainView',
        name: 'MainView',
        component: () => import('../views/MainView.vue'),
      
      children: [
        
        {
          path: '/Unit',
          name: 'Unit',
          component: () => import('../views/Organization/Unit.vue')
        },
        {
          path: '/UnitList',
          name: 'UnitList',
          component: () => import('../views/Organization/UnitList.vue')
        },
        {
          path: '/Department',
          name: 'Department',
          component: () => import('../views/Organization/Department.vue')
        },
        {
          path: '/DepartmentList',
          name: 'DepartmentList',
          component: () => import('../views/Organization/DepartmentList.vue')
        },
      ]
    }
  ]
})

export default router
